From dee3c2e4d21713cd1266778a6584ac2262af0a11 Mon Sep 17 00:00:00 2001 From: torkleyy Date: Tue, 16 May 2017 19:44:05 +0200 Subject: [PATCH] Fix build_all_exclude by using with_stderr_contains because parallel build may mix up the lines. Additionally, remove the last line of the benchmark. --- tests/bench.rs | 4 +--- tests/build.rs | 6 +++--- tests/test.rs | 4 +--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/tests/bench.rs b/tests/bench.rs index 96b30aa1c..d8043c7d7 100644 --- a/tests/bench.rs +++ b/tests/bench.rs @@ -1061,9 +1061,7 @@ fn bench_all_exclude() { execs().with_status(0) .with_stdout_contains("\ running 1 test -test bar ... bench: 0 ns/iter (+/- 0) - -test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured")); +test bar ... bench: 0 ns/iter (+/- 0)")); } #[test] diff --git a/tests/build.rs b/tests/build.rs index 20f0d4b37..3fdedf825 100644 --- a/tests/build.rs +++ b/tests/build.rs @@ -2841,9 +2841,9 @@ fn build_all_exclude() { .arg("--exclude") .arg("baz"), execs().with_status(0) - .with_stderr("[..] Compiling bar v0.1.0 ([..])\n\ - [..] Compiling foo v0.1.0 ([..])\n\ - [..] Finished dev [unoptimized + debuginfo] target(s) in [..]\n")); + .with_stderr_contains("[..]Compiling foo v0.1.0 [..]") + .with_stderr_contains("[..]Compiling bar v0.1.0 [..]") + .with_stderr_does_not_contain("[..]Compiling baz v0.1.0 [..]")); } #[test] diff --git a/tests/test.rs b/tests/test.rs index 07edf1952..c05593d14 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -2418,9 +2418,7 @@ fn test_all_exclude() { .arg("baz"), execs().with_status(0) .with_stdout_contains("running 1 test -test bar ... ok - -test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured")); +test bar ... ok")); } #[test] -- 2.30.2